package com.umeox.watch.moto.poweroff;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class PowerOffReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (("android.intent.action.POWEROFF_DIALOG").equals(action)) {
            Intent intent1 = new Intent(context, MainActivity.class);
            intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intent1);
        }
    }

}
